ATSUGetFontFallbacks

Obtains the fonts to employ and search order to use when fallback mapping is required.

OSStatus ATSUGetFontFallbacks (
                     ItemCount iMaxFontFallbacksCount,
                     ATSUFontID oFontIDs[],
                     ATSUFontFallbackMethod *oFontFallbackMethod,
                     ItemCount *oActualFallbacksCount);
iMaxFontFallbacksCount
The maximum number of fonts that you want searched. Typically, this is equivalent to the number of fonts in the oFontIDs array. To determine this value, see the discussion below.

oFontIDs
An array of values of type ATSUFontID. Before calling ATSUGetFontFallbacks, pass a pointer to memory that you have allocated for this array. If you are uncertain of how much memory to allocate, see the discussion below. On return, the array contains the fonts that you previously set to be searched for fallback mapping.

oFontFallbackMethod
A pointer to a value of type ATSUFontFallbackMethod. On return, the previously set order to search fonts in the iFontIDs array. See Font Fallback Constants for a description of possible values.

oActualFallbacksCount
A pointer to a count. On return, the actual number of fonts that you want searched. This may be greater than the value passed in the iMaxFontFallbacksCount parameter. You cannot pass NULL for this parameter.

function result
A result code. See Result Codes.
DISCUSSION
The ATSUGetFontFallbacks function obtains the fonts to employ and search order to use that you set in a previous set to the function ATSUSetFontFallbacks. They can also reflect the default fallback mapping order if you did not call ATUSetFontFallbacks.

The best way to use ATSUGetFontFallbacks is to call it twice:

  1. Pass NULL for the oFontIDs parameter and 0 for the other parameters. ATSUGetFontFallbacks returns the size of the font array in the oActualFallbacksCount parameter.

  2. Allocate enough space for an array of the returned size, then call the function again, passing a pointer in the oFontIDs parameter; on return, the pointer references an array of fonts to be searched.
VERSION NOTES
Available beginning with ATSUI 1.1.


© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)